package com.hand.todo.domain.entity;

<<<<<<< HEAD
import com.fasterxml.jackson.annotation.JsonInclude;
import io.choerodon.mybatis.annotation.ModifyAudit;
import io.choerodon.mybatis.annotation.VersionAudit;

import javax.persistence.*;
import java.time.LocalDate;
import java.time.format.DateTimeFormatter;
import java.util.Date;
import java.util.List;

//@ModifyAudit
//@VersionAudit
//@JsonInclude(JsonInclude.Include.NON_NULL)
@Table(name = "hodr_so_header")
public class HodrSoHeader {
    @Id
    @GeneratedValue
=======
import java.util.Date;

public class HodrSoHeader {
>>>>>>> 08166dcae0fc4e7661331ad59cced26a4fc34bcf
    private Long soHeaderId;

    private String orderNumber;

    private Long companyId;

    private Date orderDate;

    private String orderStatus;

    private Long customerId;

    private Long createdBy;

    private Date creationDate;

    private Long lastUpdatedBy;

<<<<<<< HEAD
    @Transient
    private String itemCode;

    @Transient
    private List<HodrSoLine> soLines;

    private Date lastUpdateDate;

    @Version
    private Long objectVersionNumber;


    synchronized public static String generateOrderNumber() {
        LocalDate date = LocalDate.now();
        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyyMMdd");
        Long orderNumber = System.nanoTime();
        return "SO" + date.format(formatter).toString() + orderNumber.toString();
    }


    public String getItemCode() {
        return itemCode;
    }

    public void setItemCode(String itemCode) {
        this.itemCode = itemCode;
    }

=======
    private Date lastUpdateDate;

    private Long objectVersionNumber;

>>>>>>> 08166dcae0fc4e7661331ad59cced26a4fc34bcf
    public Long getSoHeaderId() {
        return soHeaderId;
    }

    public void setSoHeaderId(Long soHeaderId) {
        this.soHeaderId = soHeaderId;
    }

    public String getOrderNumber() {
        return orderNumber;
    }

    public void setOrderNumber(String orderNumber) {
        this.orderNumber = orderNumber == null ? null : orderNumber.trim();
    }

    public Long getCompanyId() {
        return companyId;
    }

    public void setCompanyId(Long companyId) {
        this.companyId = companyId;
    }

    public Date getOrderDate() {
        return orderDate;
    }

    public void setOrderDate(Date orderDate) {
        this.orderDate = orderDate;
    }

    public String getOrderStatus() {
        return orderStatus;
    }

    public void setOrderStatus(String orderStatus) {
        this.orderStatus = orderStatus == null ? null : orderStatus.trim();
    }

    public Long getCustomerId() {
        return customerId;
    }

    public void setCustomerId(Long customerId) {
        this.customerId = customerId;
    }

    public Long getCreatedBy() {
        return createdBy;
    }

<<<<<<< HEAD
    public List<HodrSoLine> getSoLines() {
        return soLines;
    }

    public void setSoLines(List<HodrSoLine> soLines) {
        this.soLines = soLines;
    }

=======
>>>>>>> 08166dcae0fc4e7661331ad59cced26a4fc34bcf
    public void setCreatedBy(Long createdBy) {
        this.createdBy = createdBy;
    }

    public Date getCreationDate() {
        return creationDate;
    }

    public void setCreationDate(Date creationDate) {
        this.creationDate = creationDate;
    }

    public Long getLastUpdatedBy() {
        return lastUpdatedBy;
    }

    public void setLastUpdatedBy(Long lastUpdatedBy) {
        this.lastUpdatedBy = lastUpdatedBy;
    }

    public Date getLastUpdateDate() {
        return lastUpdateDate;
    }

    public void setLastUpdateDate(Date lastUpdateDate) {
        this.lastUpdateDate = lastUpdateDate;
    }

    public Long getObjectVersionNumber() {
        return objectVersionNumber;
    }

    public void setObjectVersionNumber(Long objectVersionNumber) {
        this.objectVersionNumber = objectVersionNumber;
    }
<<<<<<< HEAD

    @Override
    public String toString() {
        return "HodrSoHeader{" +
                "soHeaderId=" + soHeaderId +
                ", orderNumber='" + orderNumber + '\'' +
                ", companyId=" + companyId +
                ", orderDate=" + orderDate +
                ", orderStatus='" + orderStatus + '\'' +
                ", customerId=" + customerId +
                ", createdBy=" + createdBy +
                ", creationDate=" + creationDate +
                ", lastUpdatedBy=" + lastUpdatedBy +
                ", lastUpdateDate=" + lastUpdateDate +
                ", objectVersionNumber=" + objectVersionNumber +
                ", itemCode='" + itemCode + '\'' +
                ", lines=" + soLines +
                '}';
    }
=======
>>>>>>> 08166dcae0fc4e7661331ad59cced26a4fc34bcf
}